package hn.cch.spring.jdbc;

import org.springframework.context.annotation.ConfigurationClassPostProcessor;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

public class SpringJdbcApplication {

    public static void main(String[] args) {
        GenericApplicationContext applicationContext = new GenericApplicationContext();
        applicationContext.registerBean("springJdbcConfiguration", SpringJdbcConfiguration.class);
        // @ComponentScan @Bean @Import @ImportResource
        applicationContext.registerBean(ConfigurationClassPostProcessor.class);
        applicationContext.refresh();
        JdbcTemplate jdbcTemplate = applicationContext.getBean(JdbcTemplate.class);
        applicationContext.close();
    }
}
